<template>
  <div id="app">
    <!-- 写一个功能，根据不同的属性生成不同的h标签 -->
    <!-- <level type='1'>1</level>
        <level type='2'>2</level> -->
    <my-menu :tree="tree"></my-menu>
  </div>
</template>

<script>
// import Level from './components/level.js'
// import MyMenu from "./components/my-menu.vue";
import MyMenu from "./components/menus.js";

export default {
  components: {
    // Level
    MyMenu,
  },
  data() {
    return {
      tree: [
        {
          title: "菜单1",
          children: [{ title: "菜单1-1" }],
        },
        {
          title: "菜单2",
          children: [
            {
              title: "菜单2-1",
              children: [
                {
                  title: "菜单2-1-1",
                },
              ],
            },
          ],
        },
        {
          title: "菜单3",
        },
      ],
    };
  },
};
</script>